

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>iframe</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="../layui/css/layui.css" media="all">
  <style>
    body{padding:10px; font-size:14px; background:#fff; width:95%; margin:0 auto; font-size:14px; line-height:20px; overflow:hidden;}
    p{margin-bottom:10px;}
    input{border:1px solid #999; padding:5px 10px; margin:0 10px 10px 0;}
  </style>
</head>
<body>



<form id="form">
  <div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin" style="padding: 20px 0 0 0;">
    <div class="layui-form-item">
      <label class="layui-form-label">客户 id</label>
      <div class="layui-input-inline">
        <input type="hidden" name="id">
<!--        <input type="text" name="cusId" lay-verify="required" placeholder="请输入客户 id" autocomplete="off" class="layui-input">-->
        <select name="cusId" id="select_cus">-->
          //自动填充的客户信息
        </select>
      </div>
    </div>
    <div class="layui-form-item" id="creatTime">
      <label class="layui-form-label">创建订单时间</label>
      <div class="layui-input-inline">
        <input type="text" name="createtime" disabled readonly autocomplete="off" class="layui-input">
      </div>
    </div>
    <div class="layui-form-item" id="updateTime">
      <label class="layui-form-label">更新时间</label>
      <div class="layui-input-inline">
        <input type="text" name="updatetime" disabled readonly autocomplete="off" class="layui-input">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">充值金额</label>
      <div class="layui-input-inline">
        <input type="text" name="money" lay-verify="required" placeholder="请输入充值金额" autocomplete="off" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item" lay-filter="state">
      <label class="layui-form-label">选择状态</label>
      <div class="layui-input-block">
        <input id="normal" type="radio" name="state" value="1" title="正常">
        <input id="disabled" type="radio" name="state" value="0" title="停用">
      </div>
    </div>

    <div class="layui-form-item" lay-filter="paymentType">
      <label class="layui-form-label">支付类型</label>
      <div class="layui-input-block">
        <input id="unionPay" type="radio" name="paymentType" value="0" title="银联">
        <input id="wechatPay" type="radio" name="paymentType" value="1" title="微信">
        <input id="aliPay" type="radio" name="paymentType" value="2" title="支付宝">
      </div>
    </div>

    <div class="layui-form-item layui-hide">
      <input type="button" lay-submit lay-filter="LAY-user-front-submit" id="LAY-user-front-submit" value="确认">
    </div>
  </div>
</form>



<script src="../layui/layui.js"></script>

<script>
  layui.config({
    base: '../layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'form'], function(){
    var $ = layui.$;
    // ,form = layui.form;




  });
  function refresh() {
    layui.use('form', function(){
      var form = layui.form;
      form.render();
      form.render('select','test');

    });
  }
</script>

<script>
  layui.use('layer', function(){
    var $ = layui.$
            ,layer = layui.layer
            ,form = layui.form
            ,index = parent.layer.getFrameIndex(window.name); //获取窗口索引


    var active = {
      close: function(set){
        parent.layer.close(index);
      }

    }

    $('.layui-btn-container .layui-btn').on('click', function(){
      var othis = $(this)
              ,type = othis.data('type');
      active[type] && active[type].call(this);
    });
  });
</script>
</body>
</html>
